package m.jclecai.com.adapter;

import android.content.Context;
import android.view.ViewGroup;

import java.util.List;

import m.jclecai.com.R;
import m.jclecai.com.adapter.base.ViewHolerAdapter;
import m.jclecai.com.adapter.holder.ChampionHolder;
import m.jclecai.com.bean.RecordsBean;

/**
 *  世界杯冠军、亚军适配器
 * Created by zed on 2018/4/8.
 */

public class ChampionAdapter extends ViewHolerAdapter<ChampionHolder> {
    List<RecordsBean> datas;
    Context mContext;

    public ChampionAdapter(List<RecordsBean> datas, Context mContext) {
        this.datas = datas;
        this.mContext = mContext;
    }

    @Override
    public ChampionHolder onCreateViewHolder(int position, ViewGroup parent) {
        return new ChampionHolder(mContext, R.layout.item_champion_v1);
    }

    @Override
    public void onBindViewHolder(int position, ChampionHolder championHolder) {
        championHolder.initV1(position + 1, datas.get(position));

    }

    @Override
    public int getCount() {
        return datas.size();
    }
}
